package org.vergil.aop;

import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

import java.sql.SQLException;

/**
 * Created by vergil on 4/29/17.
 */
@Aspect
@Component
public class DaoAop {

//    @AfterThrowing(throwing="e",pointcut = "execution(* org.vergil.core.dao.*.*(..))")
//    public void afterThrowing(SQLException e){
//        System.out.println(e.getMessage());
//    }

    @Before(value = "execution(* org.vergil.core.dao.*.*(..))")
    public void returnNull(){
        System.out.println("test");
    }

}
